import request from '@/utils/request'

// 服务监控
const URL_PREFIX = '/system/logs/operate'

/**
 * 获取分页列表
 */
export function getPage(params) {
  return request({
    url: URL_PREFIX + '/getPage',
    method: 'GET',
    params
  })
}

/**
 * 获取当前登录用户的分页列表
 */
export function getPageByCurrentLogin(params) {
  return request({
    url: URL_PREFIX + '/getPageByCurrentLogin',
    method: 'GET',
    params
  })
}

/**
 * 获取详情
 */
export function getInfo(id) {
  return request({
    url: URL_PREFIX + '/' + id,
    method: 'GET'
  })
}

/**
 * 删除
 */
export function del(data) {
  return request({
    url: URL_PREFIX,
    method: 'DELETE',
    data
  })
}

/**
 * 清空
 */
export function clear() {
  return request({
    url: URL_PREFIX + '/clear',
    method: 'DELETE'
  })
}
